package com.kilomob.grady.rpc;


import com.kilomob.grady.exception.GradyException;

public interface Invoker<T> extends Node {
    
    
    /**
     * get service interface.
     * 
     * @return service interface.
     */
    Class<T> getInterface();

    /**
     * invoker
     * 
     * 
     * @param invocation
     * @return
     * @throws GradyException
     */
    Object invoke(Invocation invocation) throws GradyException;
    
    
    void setAsync(boolean isAsync);
    
    void setOneway(boolean isOneway);
    
    void setTimeout(int timeout);
}
